<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        ul {
            list-style: none;
        }

        ul li {
            width: 100px;
            height: 100px;
            background: skyblue;
            /* 贴在网页左侧 按照顺序重新水平布局 */
            float: left;
            /* 贴在网页得右侧，顺序会反过来 */
            float: right;
        }
    </style>
</head>

<body>
    <!-- 浮动 -->
    <!-- 
        float
            left 按照顺序水平布局
            right 把顺序反过来水平布局
     -->
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
    </ul>
</body>

</html>